-
Couldn't load subscription status.
- Fork 7
feat: add action select #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 5aa9e5c The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| const columnHelper = createColumnHelper<BaseData>() | ||
| return [ | ||
| ...(listViewProps.actions?.delete | ||
| ...(listViewProps.actions?.select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it mean delete will not be usable if select is not turned on.
| ...(listViewProps.actions?.select | |
| ...((listViewProps.actions?.select || listViewProps.actions?.delete) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no delete still useable in action dropdown this action is only for disable select action
| loadingItems={pagination.pageSize} | ||
| className="static" | ||
| onRowClick="toggleSelect" | ||
| onRowClick={listViewProps.actions?.select ? 'toggleSelect' : undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous comment
| onRowClick={listViewProps.actions?.select ? 'toggleSelect' : undefined} | |
| onRowClick={(listViewProps.actions?.select || listViewProps.actions?.delete) ? 'toggleSelect' : undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please provide an example for the select flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About this: the current approach removes select and actions from columns.
Instead, we provide helper functions to create select and actions.
Users can use the helper functions like this:
const columns = [
selectColumn(),
columnHelper.access(...),
columnHelper.display({ ... }),
actionsColumn({
view: true,
delete: true,
}),
]Note: The design is not final yet. Feel free to improve it.
Why did you create this PR
Some collection don't want to have select checkbox or bulk delete
What did you do
selectScreenshots / Recordings
Select:
falseSelect:
trueChecklist